import { createRouter, createWebHistory } from 'vue-router'
import IndexView from '../views/HomeIndex.vue'
import FileConverter from '../views/FileConverter.vue'
import DataComparator from '../views/DataComparator.vue'
import FileDiff from '../views/FileDiff.vue'
import JsonToSql from '@/views/JsonToSql.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: IndexView,
    },
    {
      path: '/about',
      name: 'about',
      // route level code-splitting
      // this generates a separate chunk (About.[hash].js) for this route
      // which is lazy-loaded when the route is visited.
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/home/tools/toMarkdown',
      name: 'toMarkdown',
      component: () => import('../views/ToMarkdown.vue'),
    },
    {
      path: '/home/tools/sqlToDto',
      name: 'SqlToDTO',
      component: () => import('../utils/SqlToMarkdownDemo.vue'),
    },
    {
      path: '/home/tools/jsonToSql',
      name: 'jsonToSql',
      component: () => JsonToSql,
    },
    {
      path: '/home/tools/fileConverter',
      name: 'fileConverter',
      component: FileConverter,
    },
    {
      path: '/home/tools/timeConverter',
      name: 'timeConverter',
      component: () => import('../views/TimeConverter.vue'),
    },
    {
      path: '/home/tools/batchInsert',
      name: 'batchInsert',
      component: () => import('../views/BatchInsert.vue'),
    },
    {
      path: '/home/tools/excelCompare',
      name: 'ExcelCompare',
      component: () => import('@/views/ExcelCompare.vue'),
    },
    {
      path: '/home/tools/excelBigDataCompare',
      name: 'ExcelBigDataCompare',
      component: () => import('@/views/ExcelBigDataCompare.vue'),
    },
    {
      path: '/home/tools/comparator',
      name: 'data-comparator',
      component: DataComparator,
    },
    {
      path: '/home/tools/csvGenerator',
      name: 'csvGenerator',
      component: () => import('@/views/CsvDataGenerator.vue'),
    },
    {
      path: '/home/tools/fileDiff',
      name: 'fileDiff',
      component: FileDiff,
    },
  ],
})

export default router
